]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
Panel: don't animate session mode switches
authorGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 6 Sep 2012 19:22:57 +0000 (21:22 +0200)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Thu, 6 Sep 2012 19:38:18 +0000 (21:38 +0200)
It causes problems with extensions, and it's excessively distracting.

https://bugzilla.gnome.org/show_bug.cgi?id=683526

js/ui/panel.js

index c35bc39db6b5ec3a08a8e19c36da449bd5d15520..f057573578b3ed7a069a60d6bec46246b03bb8db 100644 (file)
@@ -965,7 +965,7 @@ const Panel = new Lang.Class({
         Main.ctrlAltTabManager.addGroup(this.actor, _("Top Bar"), 'start-here-symbolic',
                                         { sortGroup: CtrlAltTab.SortGroup.TOP });
 
-        Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
+        Main.sessionMode.connect('updated', Lang.bind(this, this._updatePanel));
         this._updatePanel();
     },
 
@@ -1130,41 +1130,13 @@ const Panel = new Lang.Class({
         }
     },
 
-    _tweenAndUpdatePanel: function() {
-        this._closeIndicatorMenus();
-
-        Tweener.addTween(this, {
-            boxOpacity: 0,
-            time: Overview.ANIMATION_TIME / 2,
-            transition: 'easeOutQuad',
-            onCompleteScope: this,
-            onComplete: function() {
-                this._updatePanel();
-                Tweener.addTween(this, {
-                    boxOpacity: 255,
-                    time: Overview.ANIMATION_TIME / 2,
-                    transition: 'easeOutQuad'
-                });
-            }
-        });
-    },
-
-    _sessionUpdated: function() {
-        this._tweenAndUpdatePanel();
-    },
-
-    _closeIndicatorMenus: function() {
-        for (let role in this.statusArea) {
-            let indicator = this.statusArea[role];
-            indicator.menu.close();
-        }
-    },
-
     _hideIndicators: function() {
         for (let role in PANEL_ITEM_IMPLEMENTATIONS) {
             let indicator = this.statusArea[role];
             if (!indicator)
                 continue;
+            if (indicator.menu)
+                indicator.menu.close();
             indicator.container.hide();
         }
     },